import VueRouter from 'vue-router'
import Vue from 'vue'

Vue.use(VueRouter)

const routes = [
  // 配置默认路由
  {
    path:'/',
    redirect: '/index'
  },
  {
    path:'/index',
    component:()=>import('@/views/index.vue')
  },
  {
    path:'/category',
    component:()=>import('@/views/category')
  },
  {
    path:'/agents',
    component:()=>import('@/views/agents')
  },
  {
    path:'/properties',
    component:()=>import('@/views/properties')
  },
  {
    path:'/detail',
    component:()=>import('@/views/detail')
  },
  {
    path:'/page',
    component:()=>import('@/views/page')
  }

]

const router = new VueRouter({
  routes
})

export default router